﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI
{
    public partial class Form1 : Form
    {
        
       
        public Form1()
        {
            InitializeComponent();
        }
        
        private void Form1_Load(object sender, EventArgs e)
        {
            
            frmGioiThieu frmGT = new frmGioiThieu(); 
                frmGT.MdiParent = this;
                frmGT.Show();
            
        }


        private void tabMenu_MouseClick(object sender, MouseEventArgs e)
        {
            //MessageBox.Show("hihi");
        }

        private void tabPage2_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("hihi");
        }

        private void tabSanPham_Click(object sender, EventArgs e)
        {

        }
        frmThemThietBi frmSP = new frmThemThietBi();
        private void tsThemSP_Click(object sender, EventArgs e)
        {
            foreach (Form frm in MdiChildren)
                frm.Close();
            frmThemThietBi frmSP = new frmThemThietBi();
            frmSP.MdiParent = this;
            frmSP.Show();
        }
        public void Close_All()
        {
            foreach (Form frm in MdiChildren)
                frm.Close();
        }
        private void tsEditSP_Click(object sender, EventArgs e)
        {
            //Close_All();
            //frmAddPin frmPin = new frmAddPin();
            //frmPin.MdiParent = this;
            //frmPin.Show();
            Close_All();
            frmThemPin frmPin = new frmThemPin();
            frmPin.MdiParent = this;
            frmPin.Show();
        }

        private void tsAcQuy_Click(object sender, EventArgs e)
        {
            Close_All();
            frmThietBiLuuTru frm = new frmThietBiLuuTru();
            frm.MdiParent = this;
            frm.Show();
        }

        private void tsTinhP_Click(object sender, EventArgs e)
        {
            Close_All();
            frmTongCongXuat frmPin = new frmTongCongXuat();
            frmPin.MdiParent = this;
            frmPin.Show();
            //tsTinhP.BackColor = System.Drawing.Color.DarkBlue;
            //tsTuVanT.BackColor = System.Drawing.Color.Transparent;
        }

        private void tsTuVanT_Click(object sender, EventArgs e)
        {
            Close_All();
            frmTuVan frm = new frmTuVan();
            frm.MdiParent = this;
            frm.Show();
        }

        private void tsboDieuKhienSac_Click(object sender, EventArgs e)
        {
            Close_All();
            frmMachDieuKhienSac frm = new frmMachDieuKhienSac();
            frm.MdiParent = this;
            frm.Show();
        }

        private void tsboChuyenDoiDien_Click(object sender, EventArgs e)
        {
            Close_All();
            frmBoChuyenDoiDien frm = new frmBoChuyenDoiDien();
            frm.MdiParent = this;
            frm.Show();
        }

        private void tssoGioNang_Click(object sender, EventArgs e)
        {
            Close_All();
            frmSoGioNang frm = new frmSoGioNang();
            frm.MdiParent = this;
            frm.Show();
        }

        private void toolStripButton6_Click(object sender, EventArgs e)
        {
            Close_All();
            frmTimKiem frm = new frmTimKiem();
            frm.MdiParent = this;
            frm.Show();
        }

        private void toolStripButton10_Click(object sender, EventArgs e)
        {
            Close_All();
            frmQuanLyPin frm = new frmQuanLyPin();
            frm.MdiParent = this;
            frm.Show();
        }
    }
}
